
class Settings:
    """存储游戏所有设置的类"""

    def __init__(self):
        """初始化游戏的静态设置"""
        # 屏幕设置
        self.screen_width = 1200
        self.screen_height = 800
        self.background_color = (230, 230, 230)

        # 飞船的设置
        self.spacecraft_life_limit = 3

        # 游戏关卡限制
        self.game_level_limit = 5

        # 子弹数量的限制
        self.bullets_allowed = 3

        # 以什么样的速度加快游戏节奏
        self.speed_up_scale = 1.25

        # 初始化动态设置
        self.initialize_dynamic_settings()

    def initialize_dynamic_settings(self):
        """初始化随游戏进行而变化的设置"""
        self.spacecraft_speed_factor = 1.0
        self.bullet_speed_factor = 3
        self.enemy_speed_factor = 0.75
        self.enemy_drop_speed_factor = 0.07

        # 1表示向右，-1表示向左
        self.fleet_direction = 1

        # 记分
        self.enemy_points = 50

    def increase_speed(self):
        """提高速度设置"""
        # self.spacecraft_speed_factor *= self.speed_up_scale
        # self.bullet_speed_factor *= self.speed_up_scale
        self.enemy_speed_factor *= self.speed_up_scale
        self.enemy_drop_speed_factor *= self.speed_up_scale




